<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: Gateway ASCII mapping</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__CO__CANopen__309__3.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Gateway ASCII mapping<div class="ingroups"><a class="el" href="group__CO__CANopen__309.html">CANopen_309</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__CO__CANopen__309__3__Syntax"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3__Syntax.html">Command syntax</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__gateway__ascii_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__gateway__ascii_8h.html">CO_gateway_ascii.h</a></td></tr>
<tr class="memdesc:CO__gateway__ascii_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen access from other networks - ASCII mapping (CiA 309-3 DS v3.0.0) <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Gateway-ascii object.  <a href="structCO__GTWA__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga52919223e5f43323f15c6a382913653d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#ga52919223e5f43323f15c6a382913653d">CO_GTWA_RESP_BUF_SIZE</a>&#160;&#160;&#160;200</td></tr>
<tr class="memdesc:ga52919223e5f43323f15c6a382913653d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of response string buffer.  <a href="group__CO__CANopen__309__3.html#ga52919223e5f43323f15c6a382913653d">More...</a><br /></td></tr>
<tr class="separator:ga52919223e5f43323f15c6a382913653d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa631d47f972204f26502d65894694cfb"><td class="memItemLeft" align="right" valign="top"><a id="gaa631d47f972204f26502d65894694cfb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#gaa631d47f972204f26502d65894694cfb">CO_GTWA_STATE_TIMEOUT_TIME_US</a>&#160;&#160;&#160;1200000</td></tr>
<tr class="memdesc:gaa631d47f972204f26502d65894694cfb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Timeout time in microseconds for some internal states. <br /></td></tr>
<tr class="separator:gaa631d47f972204f26502d65894694cfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga92e67dec9b5e29cdd67a28651db237fb"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#ga92e67dec9b5e29cdd67a28651db237fb">CO_GTWA_respErrorCode_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba46a2114a5c4d9b43babecebb11573c66">CO_GTWA_respErrorNone</a> = 0, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba04540349402c75b73af33951db285904">CO_GTWA_respErrorReqNotSupported</a> = 100, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba541a3546ac6be179c728272409259c98">CO_GTWA_respErrorSyntax</a> = 101, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba1d990943991355e276f31533c841cb81">CO_GTWA_respErrorInternalState</a> = 102, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba81131bf73d1ad39163a8b28e5ecf92fd">CO_GTWA_respErrorTimeOut</a> = 103, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbad05b7717a0f79d333eed37ced2e758f9">CO_GTWA_respErrorNoDefaultNetSet</a> = 104, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbac668fafa372a0cee1d50ceb0f5ed7b4a">CO_GTWA_respErrorNoDefaultNodeSet</a> = 105, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba291ec5267c935d6277c27c767e2dd178">CO_GTWA_respErrorUnsupportedNet</a> = 106, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbaf65eee2744df8e528312139a54a853d5">CO_GTWA_respErrorUnsupportedNode</a> = 107, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba1111be206d1ebfb62caa217d6231092c">CO_GTWA_respErrorLostGuardingMessage</a> = 200, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba9cc980ac35af4c1f9ad1d96719f05425">CO_GTWA_respErrorLostConnection</a> = 201, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbaf4ed1e079359d86cee1ad431ed745886">CO_GTWA_respErrorHeartbeatStarted</a> = 202, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbaba7c053af330ec3ffdc8c2c298db6c93">CO_GTWA_respErrorHeartbeatLost</a> = 203, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbad007ed28e48b2fd7c287de3e6755a604">CO_GTWA_respErrorWrongNMTstate</a> = 204, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbaa4c5257721f3b64c231f67dccacd2ee7">CO_GTWA_respErrorBootUp</a> = 205, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba6f9a335886d942ef028878832551afe0">CO_GTWA_respErrorErrorPassive</a> = 300, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbabb407ab8220e0d3f0ebc06f867ecac9c">CO_GTWA_respErrorBusOff</a> = 301, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba8aa993a6c57d8db7d6355260a091e4a4">CO_GTWA_respErrorCANbufferOverflow</a> = 303, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba97d5b22449aadae1226679986d654bbc">CO_GTWA_respErrorCANinit</a> = 304, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba06e779c446aae0f7c6021dd0b955ffe8">CO_GTWA_respErrorCANactive</a> = 305, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbace2f0ef57b11e716d7ca58369ff5eede">CO_GTWA_respErrorPDOalreadyUsed</a> = 400, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbadd3dbd3197e1756102508208e394d72f">CO_GTWA_respErrorPDOlengthExceeded</a> = 401, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba7e3209f49a5ae7bad0b197110aa78512">CO_GTWA_respErrorLSSmanufacturer</a> = 501, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba6e164941b6f3a18ef6e366e7c53073b6">CO_GTWA_respErrorLSSnodeIdNotSupported</a> = 502, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbad8ff0b3e8970d010eb084a703fa794db">CO_GTWA_respErrorLSSbitRateNotSupported</a> = 503, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba315295e9ea4cdaba0955e6d8920df5a5">CO_GTWA_respErrorLSSparameterStoringFailed</a> = 504, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fbacc7ec1f2040bebb15becb067673e40e5">CO_GTWA_respErrorLSSmediaError</a> = 505, 
<a class="el" href="group__CO__CANopen__309__3.html#gga92e67dec9b5e29cdd67a28651db237fba99443a03d7ba443b9beb07c6d475b350">CO_GTWA_respErrorRunningOutOfMemory</a> = 600
<br />
 }</td></tr>
<tr class="memdesc:ga92e67dec9b5e29cdd67a28651db237fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Response error codes as specified by CiA 309-3.  <a href="group__CO__CANopen__309__3.html#ga92e67dec9b5e29cdd67a28651db237fb">More...</a><br /></td></tr>
<tr class="separator:ga92e67dec9b5e29cdd67a28651db237fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae809d7b5adbc7a4fb1f2fce527b30954"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#gae809d7b5adbc7a4fb1f2fce527b30954">CO_GTWA_state_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a98a36dabc8934b9c2d37b13999e3c393">CO_GTWA_ST_IDLE</a> = 0x00U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954aaca55c8223aa1ba8f18031196178ea58">CO_GTWA_ST_READ</a> = 0x10U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a959c96b4eb3d948a977f66679423baa2">CO_GTWA_ST_WRITE</a> = 0x11U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954ab10b68af4a8bc47f96abf552c7baa3b9">CO_GTWA_ST_WRITE_ABORTED</a> = 0x12U, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954afcc0bdbc08aa70d401f122c73055223e">CO_GTWA_ST_LSS_SWITCH_GLOB</a> = 0x20U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a19bb6359e2efba37226a5dcf27d4a0e3">CO_GTWA_ST_LSS_SWITCH_SEL</a> = 0x21U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954acbc1d88036a086ae9d9dcbed1742330e">CO_GTWA_ST_LSS_SET_NODE</a> = 0x22U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a6e18980d6fbcbd7dd871af5c98c4755e">CO_GTWA_ST_LSS_CONF_BITRATE</a> = 0x23U, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a63e0705eddd22fb9d476c1b370394fc4">CO_GTWA_ST_LSS_STORE</a> = 0x24U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954abc4877f6d72e218cbd4959279a537b94">CO_GTWA_ST_LSS_INQUIRE</a> = 0x25U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a17254161b141cc0c424c3649655f4df2">CO_GTWA_ST_LSS_INQUIRE_ADDR_ALL</a> = 0x26U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954ab8c2946ce5d3581ecf5640bd1f5667b7">CO_GTWA_ST__LSS_FASTSCAN</a> = 0x30U, 
<br />
&#160;&#160;<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a338a75317f0bf276f1c786316d6b9ec7">CO_GTWA_ST_LSS_ALLNODES</a> = 0x31U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a829f096eca2ccd152069e97d9c70022f">CO_GTWA_ST_LOG</a> = 0x80U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954af2f0ce738128675b98926aba680884d1">CO_GTWA_ST_HELP</a> = 0x81U, 
<a class="el" href="group__CO__CANopen__309__3.html#ggae809d7b5adbc7a4fb1f2fce527b30954a1a467cf33b8d3a2c0e8e31f87d81f05c">CO_GTWA_ST_LED</a> = 0x82U
<br />
 }</td></tr>
<tr class="memdesc:gae809d7b5adbc7a4fb1f2fce527b30954"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal states of the Gateway-ascii state machine.  <a href="group__CO__CANopen__309__3.html#gae809d7b5adbc7a4fb1f2fce527b30954">More...</a><br /></td></tr>
<tr class="separator:gae809d7b5adbc7a4fb1f2fce527b30954"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gabc95dab4fb09bcb18948502f922520ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#gabc95dab4fb09bcb18948502f922520ee">CO_GTWA_init</a> (<a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *gtwa, <a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *SDO_C, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> SDOclientTimeoutTime_ms, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> SDOclientBlockTransfer, <a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *NMT, <a class="el" href="structCO__LSSmaster__t.html">CO_LSSmaster_t</a> *LSSmaster, <a class="el" href="structCO__LEDs__t.html">CO_LEDs_t</a> *LEDs, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> dummy)</td></tr>
<tr class="memdesc:gabc95dab4fb09bcb18948502f922520ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Gateway-ascii object.  <a href="group__CO__CANopen__309__3.html#gabc95dab4fb09bcb18948502f922520ee">More...</a><br /></td></tr>
<tr class="separator:gabc95dab4fb09bcb18948502f922520ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2093c35b83b096e01bd0c65ae9374e30"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#ga2093c35b83b096e01bd0c65ae9374e30">CO_GTWA_initRead</a> (<a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *gtwa, size_t(*readCallback)(void *object, const char *buf, size_t count, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *connectionOK), void *readCallbackObject)</td></tr>
<tr class="memdesc:ga2093c35b83b096e01bd0c65ae9374e30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize read callback in Gateway-ascii object.  <a href="group__CO__CANopen__309__3.html#ga2093c35b83b096e01bd0c65ae9374e30">More...</a><br /></td></tr>
<tr class="separator:ga2093c35b83b096e01bd0c65ae9374e30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad614da9bb171d995c02ffe1940fe7e64"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#gad614da9bb171d995c02ffe1940fe7e64">CO_GTWA_write_getSpace</a> (<a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *gtwa)</td></tr>
<tr class="memdesc:gad614da9bb171d995c02ffe1940fe7e64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get free write buffer space.  <a href="group__CO__CANopen__309__3.html#gad614da9bb171d995c02ffe1940fe7e64">More...</a><br /></td></tr>
<tr class="separator:gad614da9bb171d995c02ffe1940fe7e64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae1f01d444be975aa3cb3b2c9ebded3d"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#gaae1f01d444be975aa3cb3b2c9ebded3d">CO_GTWA_write</a> (<a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *gtwa, const char *buf, size_t count)</td></tr>
<tr class="memdesc:gaae1f01d444be975aa3cb3b2c9ebded3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write command into <a class="el" href="structCO__GTWA__t.html" title="CANopen Gateway-ascii object.">CO_GTWA_t</a> object.  <a href="group__CO__CANopen__309__3.html#gaae1f01d444be975aa3cb3b2c9ebded3d">More...</a><br /></td></tr>
<tr class="separator:gaae1f01d444be975aa3cb3b2c9ebded3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20523907b832d55b47b855dd92409996"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#ga20523907b832d55b47b855dd92409996">CO_GTWA_log_print</a> (<a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *gtwa, const char *message)</td></tr>
<tr class="memdesc:ga20523907b832d55b47b855dd92409996"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print message log string into fifo buffer.  <a href="group__CO__CANopen__309__3.html#ga20523907b832d55b47b855dd92409996">More...</a><br /></td></tr>
<tr class="separator:ga20523907b832d55b47b855dd92409996"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4a82ef2ebdd5d5f9d8a7efe84048493d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CANopen__309__3.html#ga4a82ef2ebdd5d5f9d8a7efe84048493d">CO_GTWA_process</a> (<a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *gtwa, <a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a> enable, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:ga4a82ef2ebdd5d5f9d8a7efe84048493d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process Gateway-ascii object.  <a href="group__CO__CANopen__309__3.html#ga4a82ef2ebdd5d5f9d8a7efe84048493d">More...</a><br /></td></tr>
<tr class="separator:ga4a82ef2ebdd5d5f9d8a7efe84048493d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen access from other networks - ASCII mapping (CiA 309-3 DSP v3.0.0)</p>
<p>This module enables ascii command interface (CAN gateway), which can be used for master interaction with CANopen network. Some sort of string input/output stream can be used, for example serial port + terminal on microcontroller or stdio in OS or sockets, etc.</p>
<p>For example, one wants to read 'Heartbeat producer time' parameter (0x1017,0) on remote node (with id=4). Parameter is 16-bit integer. He can can enter command string: <code>[1] 4 read 0x1017 0 i16</code>. CANopenNode will use SDO client, send request to remote node via CAN, wait for response via CAN and prints <code>[1] OK</code> to output stream on success.</p>
<p>This module is usually initialized and processed in CANopen.c file. Application should register own callback function for reading the output stream. Application writes new commands with <a class="el" href="group__CO__CANopen__309__3.html#gaae1f01d444be975aa3cb3b2c9ebded3d" title="Write command into CO_GTWA_t object.">CO_GTWA_write()</a>. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga52919223e5f43323f15c6a382913653d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga52919223e5f43323f15c6a382913653d">&#9670;&nbsp;</a></span>CO_GTWA_RESP_BUF_SIZE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CO_GTWA_RESP_BUF_SIZE&#160;&#160;&#160;200</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Size of response string buffer. </p>
<p>This is intermediate buffer. If there is larger amount of data to transfer, then multiple transfers will occur. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga92e67dec9b5e29cdd67a28651db237fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga92e67dec9b5e29cdd67a28651db237fb">&#9670;&nbsp;</a></span>CO_GTWA_respErrorCode_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__CANopen__309__3.html#ga92e67dec9b5e29cdd67a28651db237fb">CO_GTWA_respErrorCode_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Response error codes as specified by CiA 309-3. </p>
<p>Values less or equal to 0 are used for control for some functions and are not part of the standard. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba46a2114a5c4d9b43babecebb11573c66"></a>CO_GTWA_respErrorNone&#160;</td><td class="fielddoc"><p>0 - No error or idle </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba04540349402c75b73af33951db285904"></a>CO_GTWA_respErrorReqNotSupported&#160;</td><td class="fielddoc"><p>100 - Request not supported </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba541a3546ac6be179c728272409259c98"></a>CO_GTWA_respErrorSyntax&#160;</td><td class="fielddoc"><p>101 - Syntax error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba1d990943991355e276f31533c841cb81"></a>CO_GTWA_respErrorInternalState&#160;</td><td class="fielddoc"><p>102 - Request not processed due to internal state </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba81131bf73d1ad39163a8b28e5ecf92fd"></a>CO_GTWA_respErrorTimeOut&#160;</td><td class="fielddoc"><p>103 - Time-out (where applicable) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbad05b7717a0f79d333eed37ced2e758f9"></a>CO_GTWA_respErrorNoDefaultNetSet&#160;</td><td class="fielddoc"><p>104 - No default net set </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbac668fafa372a0cee1d50ceb0f5ed7b4a"></a>CO_GTWA_respErrorNoDefaultNodeSet&#160;</td><td class="fielddoc"><p>105 - No default node set </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba291ec5267c935d6277c27c767e2dd178"></a>CO_GTWA_respErrorUnsupportedNet&#160;</td><td class="fielddoc"><p>106 - Unsupported net </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbaf65eee2744df8e528312139a54a853d5"></a>CO_GTWA_respErrorUnsupportedNode&#160;</td><td class="fielddoc"><p>107 - Unsupported node </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba1111be206d1ebfb62caa217d6231092c"></a>CO_GTWA_respErrorLostGuardingMessage&#160;</td><td class="fielddoc"><p>200 - Lost guarding message </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba9cc980ac35af4c1f9ad1d96719f05425"></a>CO_GTWA_respErrorLostConnection&#160;</td><td class="fielddoc"><p>201 - Lost connection </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbaf4ed1e079359d86cee1ad431ed745886"></a>CO_GTWA_respErrorHeartbeatStarted&#160;</td><td class="fielddoc"><p>202 - Heartbeat started </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbaba7c053af330ec3ffdc8c2c298db6c93"></a>CO_GTWA_respErrorHeartbeatLost&#160;</td><td class="fielddoc"><p>203 - Heartbeat lost </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbad007ed28e48b2fd7c287de3e6755a604"></a>CO_GTWA_respErrorWrongNMTstate&#160;</td><td class="fielddoc"><p>204 - Wrong NMT state </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbaa4c5257721f3b64c231f67dccacd2ee7"></a>CO_GTWA_respErrorBootUp&#160;</td><td class="fielddoc"><p>205 - Boot-up </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba6f9a335886d942ef028878832551afe0"></a>CO_GTWA_respErrorErrorPassive&#160;</td><td class="fielddoc"><p>300 - Error passive </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbabb407ab8220e0d3f0ebc06f867ecac9c"></a>CO_GTWA_respErrorBusOff&#160;</td><td class="fielddoc"><p>301 - Bus off </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba8aa993a6c57d8db7d6355260a091e4a4"></a>CO_GTWA_respErrorCANbufferOverflow&#160;</td><td class="fielddoc"><p>303 - CAN buffer overflow </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba97d5b22449aadae1226679986d654bbc"></a>CO_GTWA_respErrorCANinit&#160;</td><td class="fielddoc"><p>304 - CAN init </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba06e779c446aae0f7c6021dd0b955ffe8"></a>CO_GTWA_respErrorCANactive&#160;</td><td class="fielddoc"><p>305 - CAN active (at init or start-up) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbace2f0ef57b11e716d7ca58369ff5eede"></a>CO_GTWA_respErrorPDOalreadyUsed&#160;</td><td class="fielddoc"><p>400 - PDO already used </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbadd3dbd3197e1756102508208e394d72f"></a>CO_GTWA_respErrorPDOlengthExceeded&#160;</td><td class="fielddoc"><p>401 - PDO length exceeded </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba7e3209f49a5ae7bad0b197110aa78512"></a>CO_GTWA_respErrorLSSmanufacturer&#160;</td><td class="fielddoc"><p>501 - LSS implementation- / manufacturer-specific error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba6e164941b6f3a18ef6e366e7c53073b6"></a>CO_GTWA_respErrorLSSnodeIdNotSupported&#160;</td><td class="fielddoc"><p>502 - LSS node-ID not supported </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbad8ff0b3e8970d010eb084a703fa794db"></a>CO_GTWA_respErrorLSSbitRateNotSupported&#160;</td><td class="fielddoc"><p>503 - LSS bit-rate not supported </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba315295e9ea4cdaba0955e6d8920df5a5"></a>CO_GTWA_respErrorLSSparameterStoringFailed&#160;</td><td class="fielddoc"><p>504 - LSS parameter storing failed </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fbacc7ec1f2040bebb15becb067673e40e5"></a>CO_GTWA_respErrorLSSmediaError&#160;</td><td class="fielddoc"><p>505 - LSS command failed because of media error </p>
</td></tr>
<tr><td class="fieldname"><a id="gga92e67dec9b5e29cdd67a28651db237fba99443a03d7ba443b9beb07c6d475b350"></a>CO_GTWA_respErrorRunningOutOfMemory&#160;</td><td class="fielddoc"><p>600 - Running out of memory </p>
</td></tr>
</table>

</div>
</div>
<a id="gae809d7b5adbc7a4fb1f2fce527b30954"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae809d7b5adbc7a4fb1f2fce527b30954">&#9670;&nbsp;</a></span>CO_GTWA_state_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__CANopen__309__3.html#gae809d7b5adbc7a4fb1f2fce527b30954">CO_GTWA_state_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Internal states of the Gateway-ascii state machine. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a98a36dabc8934b9c2d37b13999e3c393"></a>CO_GTWA_ST_IDLE&#160;</td><td class="fielddoc"><p>Gateway is idle, no command is processing. </p>
<p>This state is starting point for new commands, which are parsed here. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954aaca55c8223aa1ba8f18031196178ea58"></a>CO_GTWA_ST_READ&#160;</td><td class="fielddoc"><p>SDO 'read' (upload) </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a959c96b4eb3d948a977f66679423baa2"></a>CO_GTWA_ST_WRITE&#160;</td><td class="fielddoc"><p>SDO 'write' (download) </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954ab10b68af4a8bc47f96abf552c7baa3b9"></a>CO_GTWA_ST_WRITE_ABORTED&#160;</td><td class="fielddoc"><p>SDO 'write' (download) - aborted, purging remaining data. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954afcc0bdbc08aa70d401f122c73055223e"></a>CO_GTWA_ST_LSS_SWITCH_GLOB&#160;</td><td class="fielddoc"><p>LSS 'lss_switch_glob'. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a19bb6359e2efba37226a5dcf27d4a0e3"></a>CO_GTWA_ST_LSS_SWITCH_SEL&#160;</td><td class="fielddoc"><p>LSS 'lss_switch_sel'. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954acbc1d88036a086ae9d9dcbed1742330e"></a>CO_GTWA_ST_LSS_SET_NODE&#160;</td><td class="fielddoc"><p>LSS 'lss_set_node'. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a6e18980d6fbcbd7dd871af5c98c4755e"></a>CO_GTWA_ST_LSS_CONF_BITRATE&#160;</td><td class="fielddoc"><p>LSS 'lss_conf_bitrate'. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a63e0705eddd22fb9d476c1b370394fc4"></a>CO_GTWA_ST_LSS_STORE&#160;</td><td class="fielddoc"><p>LSS 'lss_store'. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954abc4877f6d72e218cbd4959279a537b94"></a>CO_GTWA_ST_LSS_INQUIRE&#160;</td><td class="fielddoc"><p>LSS 'lss_inquire_addr' or 'lss_get_node'. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a17254161b141cc0c424c3649655f4df2"></a>CO_GTWA_ST_LSS_INQUIRE_ADDR_ALL&#160;</td><td class="fielddoc"><p>LSS 'lss_inquire_addr', all parameters. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954ab8c2946ce5d3581ecf5640bd1f5667b7"></a>CO_GTWA_ST__LSS_FASTSCAN&#160;</td><td class="fielddoc"><p>LSS '_lss_fastscan'. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a338a75317f0bf276f1c786316d6b9ec7"></a>CO_GTWA_ST_LSS_ALLNODES&#160;</td><td class="fielddoc"><p>LSS 'lss_allnodes'. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a829f096eca2ccd152069e97d9c70022f"></a>CO_GTWA_ST_LOG&#160;</td><td class="fielddoc"><p>print message 'log' </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954af2f0ce738128675b98926aba680884d1"></a>CO_GTWA_ST_HELP&#160;</td><td class="fielddoc"><p>print 'help' text </p>
</td></tr>
<tr><td class="fieldname"><a id="ggae809d7b5adbc7a4fb1f2fce527b30954a1a467cf33b8d3a2c0e8e31f87d81f05c"></a>CO_GTWA_ST_LED&#160;</td><td class="fielddoc"><p>print 'status' of the node </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gabc95dab4fb09bcb18948502f922520ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabc95dab4fb09bcb18948502f922520ee">&#9670;&nbsp;</a></span>CO_GTWA_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_GTWA_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *&#160;</td>
          <td class="paramname"><em>gtwa</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__SDOclient__t.html">CO_SDOclient_t</a> *&#160;</td>
          <td class="paramname"><em>SDO_C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>SDOclientTimeoutTime_ms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>SDOclientBlockTransfer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *&#160;</td>
          <td class="paramname"><em>NMT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__LSSmaster__t.html">CO_LSSmaster_t</a> *&#160;</td>
          <td class="paramname"><em>LSSmaster</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__LEDs__t.html">CO_LEDs_t</a> *&#160;</td>
          <td class="paramname"><em>LEDs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>dummy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize Gateway-ascii object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtwa</td><td>This object will be initialized </td></tr>
    <tr><td class="paramname">SDO_C</td><td>SDO client object </td></tr>
    <tr><td class="paramname">SDOclientTimeoutTime_ms</td><td>Default timeout in milliseconds, 500 typically </td></tr>
    <tr><td class="paramname">SDOclientBlockTransfer</td><td>If true, block transfer will be set by default </td></tr>
    <tr><td class="paramname">NMT</td><td>NMT object </td></tr>
    <tr><td class="paramname">LSSmaster</td><td>LSS master object </td></tr>
    <tr><td class="paramname">LEDs</td><td>LEDs object </td></tr>
    <tr><td class="paramname">dummy</td><td>dummy argument, set to 0</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a>: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT </dd></dl>

</div>
</div>
<a id="ga2093c35b83b096e01bd0c65ae9374e30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2093c35b83b096e01bd0c65ae9374e30">&#9670;&nbsp;</a></span>CO_GTWA_initRead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_GTWA_initRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *&#160;</td>
          <td class="paramname"><em>gtwa</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t(*)(void *object, const char *buf, size_t count, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *connectionOK)&#160;</td>
          <td class="paramname"><em>readCallback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>readCallbackObject</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize read callback in Gateway-ascii object. </p>
<p>Callback will be used for transfer data to output stream of the application. It will be called from <a class="el" href="group__CO__CANopen__309__3.html#ga4a82ef2ebdd5d5f9d8a7efe84048493d" title="Process Gateway-ascii object.">CO_GTWA_process()</a> zero or multiple times, depending on the data available. If readCallback is uninitialized or NULL, then output data will be purged.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtwa</td><td>This object will be initialized </td></tr>
    <tr><td class="paramname">readCallback</td><td>Pointer to external function for reading response from Gateway-ascii object. See <a class="el" href="structCO__GTWA__t.html" title="CANopen Gateway-ascii object.">CO_GTWA_t</a> for parameters. </td></tr>
    <tr><td class="paramname">readCallbackObject</td><td>Pointer to object, which will be used inside readCallback </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad614da9bb171d995c02ffe1940fe7e64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad614da9bb171d995c02ffe1940fe7e64">&#9670;&nbsp;</a></span>CO_GTWA_write_getSpace()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static size_t CO_GTWA_write_getSpace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *&#160;</td>
          <td class="paramname"><em>gtwa</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get free write buffer space. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtwa</td><td>This object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of available bytes </dd></dl>

</div>
</div>
<a id="gaae1f01d444be975aa3cb3b2c9ebded3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaae1f01d444be975aa3cb3b2c9ebded3d">&#9670;&nbsp;</a></span>CO_GTWA_write()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static size_t CO_GTWA_write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *&#160;</td>
          <td class="paramname"><em>gtwa</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write command into <a class="el" href="structCO__GTWA__t.html" title="CANopen Gateway-ascii object.">CO_GTWA_t</a> object. </p>
<p>This function copies ascii command from buf into internal fifo buffer. Command must be closed with '<br  />
' character. Function returns number of bytes successfully copied. If there is not enough space in destination, not all bytes will be copied and data can be refilled later (in case of large SDO download).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtwa</td><td>This object </td></tr>
    <tr><td class="paramname">buf</td><td>Buffer which will be copied </td></tr>
    <tr><td class="paramname">count</td><td>Number of bytes in buf</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of bytes actually written. </dd></dl>

</div>
</div>
<a id="ga20523907b832d55b47b855dd92409996"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga20523907b832d55b47b855dd92409996">&#9670;&nbsp;</a></span>CO_GTWA_log_print()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_GTWA_log_print </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *&#160;</td>
          <td class="paramname"><em>gtwa</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>message</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Print message log string into fifo buffer. </p>
<p>This function enables recording of system log messages including CANopen events. Function can be called by application for recording any message. Message is copied to internal fifo buffer. In case fifo is full, old messages will be owerwritten. Message log fifo can be read with non-standard command "log". After log is read, it is emptied.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gtwa</td><td>This object </td></tr>
    <tr><td class="paramname">message</td><td>Null terminated string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4a82ef2ebdd5d5f9d8a7efe84048493d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4a82ef2ebdd5d5f9d8a7efe84048493d">&#9670;&nbsp;</a></span>CO_GTWA_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_GTWA_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GTWA__t.html">CO_GTWA_t</a> *&#160;</td>
          <td class="paramname"><em>gtwa</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga449976458a084f880dc8e3d29e7eb6f5">bool_t</a>&#160;</td>
          <td class="paramname"><em>enable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process Gateway-ascii object. </p>
<p>This is non-blocking function and must be called cyclically</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">gtwa</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">enable</td><td>If true, gateway operates normally. If false, gateway is completely disabled and no command interaction is possible. Can be connected to hardware switch, for example. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga895d7fad40b60aacdac3cb0615729b5e" title="Process CANopen objects.">CO_process()</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CO_ReturnError_t: CO_ERROR_NO on success or CO_ERROR_ILLEGAL_ARGUMENT </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Thu Dec 24 2020 14:30:50 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
